{if $errors}
	$.growl.settings.noticeElement($('.growl-error-container'));
	{if in_array('USER_LEN', $errors)}
		$.growl('ERROR', 'Username must be 5 or more characters.');
		$.growl.settings.displayTimeout+=2000;
	{/if}
	{if in_array('USER_UNIQUE', $errors)}
		$.growl('ERROR', 'Username must be unique.  This username is already used.');
		$.growl.settings.displayTimeout+=2000;
	{/if}
	{if in_array('EMAIL', $errors)}
		$.growl('ERROR', 'Email must be valid.');
		$.growl.settings.displayTimeout+=2000;
	{/if}
	{if in_array('EMAIL_UNIQUE', $errors)}
		$.growl('ERROR', 'Email must be unique.  This email is already used.');
		$.growl.settings.displayTimeout+=2000;
	{/if}
	{if in_array('PASS_MATCH', $errors)}
		$.growl('ERROR', 'Password confirmation must match.');
		$.growl.settings.displayTimeout+=2000;
	{/if}
	{if in_array('PASS_LEN', $errors)}
		$.growl('ERROR', 'Password must be 5 or more characters.');
		$.growl.settings.displayTimeout+=2000;
	{/if}
{/if}

{if $success}
	{if $user_id}
		window.location = '/admin/global/users/edit/{$user_id}';
	{else}
		$.growl.settings.noticeElement($('.growl-message-container'));
		$.growl('UPDATED', 'The user has been updated.');
	{/if}
{/if}

